#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Classifier.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Classifier;

/// <summary>
/// InformationItem
/// InformationItems represent many kinds of information that can flow from sources
/// to targets in very abstract ways.  They represent the kinds of information that
/// may move within a system, but do not elaborate details of the transferred
/// information.  Details of transferred information are the province of other
/// Classifiers that may ultimately define InformationItems.  Consequently,
/// InformationItems cannot be instantiated and do not themselves have features,
/// generalizations, or associations. An important use of InformationItems is to
/// represent information during early design stages, possibly before the detailed
/// modeling decisions that will ultimately define them have been made. Another
/// purpose of InformationItems is to abstract portions of complex models in less
/// precise, but perhaps more general and communicable, ways. 
/// </summary>
class UMLMODEL_EXPORT InformationItem : public Classifier {

public: // Constructors and destructors
    explicit InformationItem(const QString& umlType="uml::InformationItem");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// representeds getter
    /// Determines the classifiers that will specify the structure and nature of the
    /// information. An information item represents all its represented classifiers.
    /// </summary>
    vector<shared_ptr<Classifier>>& representeds();

private: // Fields
    /// <summary>
    /// representeds
    /// Determines the classifiers that will specify the structure and nature of the
    /// information. An information item represents all its represented classifiers.
    /// </summary>
    vector<shared_ptr<Classifier>> representeds_;

};

} // namespace uml
